#include <windows.h>
#include <stdio.h>

static LARGE_INTEGER STime;

void SCodeTime(void)
{
  QueryPerformanceCounter(&STime);
}

float CodeTime(void)
{
  LARGE_INTEGER ETime;
  LARGE_INTEGER Freq;
  QueryPerformanceCounter(&ETime);
  QueryPerformanceFrequency(&Freq);

  printf("(%10.5f sec)", (float)(ETime.u.LowPart - STime.u.LowPart) / Freq.u.LowPart);

  return (float)(ETime.u.LowPart - STime.u.LowPart) / Freq.u.LowPart;
}
